
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <button @click="onClick">按钮</button>
    <ul>
      <!-- <li v-for="item in arr"> -->
      <li v-for="item in arr" :key="item">
        <input type="checkbox">{{ item }}</input>
      </li>
    </ul>
  </div>
  <script src="https://lib.baomitu.com/vue/2.6.11/vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        arr: [1, 2, 3]
      },
      methods: {
        onClick () {
          this.arr.unshift(0)
        }
      }
    })
  </script>
</body>
</html>